package com.example.springboot.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 通知表
 * </p>
 *
 * @author jiang
 * @since 2025-04-17
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("notice")
@Schema(name = "NoticeEntity", description = "通知表")
public class NoticeEntity extends Model<NoticeEntity> {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "标题")
    @TableField("name")
    private String name;

    @Schema(description = "内容")
    @TableField("content")
    private String content;

    @Schema(description = "类别")
    @TableField("type")
    private String type;

    @Schema(description = "用户")
    @TableField("user_id")
    private Integer userId;

    @Schema(description = "创建时间")
    @TableField("current")
    private Date current;

    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String CONTENT = "content";

    public static final String TYPE = "type";

    public static final String USER_ID = "user_id";

    public static final String CURRENT = "current";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
